package springremoting;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
	public static void main(String[] args) {
//		//启动服务端容器
//		new ClassPathXmlApplicationContext("spring-service.xml");
//		//HelloWorldRmiService hello = (HelloWorldRmiService)context.getBean("");
//		System.out.println("RMI服务启动");
		
		//启动客户端容器
		ApplicationContext contextClient = new ClassPathXmlApplicationContext("spring-client.xml");
		HelloWorldClient hello = (HelloWorldClient)contextClient.getBean("helloWorldClient");
		System.out.println(hello.getHelloWorld());
	}
}
